﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;

namespace FAFramework.Forms.Main
{
    /// <summary>
    /// PageDateTime.xaml에 대한 상호 작용 논리
    /// </summary>
    public partial class PageDateTime : Page
    {
        private DispatcherTimer _timer = new DispatcherTimer();

        public PageDateTime()
        {
            InitializeComponent();
        }

        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            _timer.Tick += OnTick;
            _timer.Interval = new TimeSpan(1000);
            _timer.Start();
        }

        private void OnTick(Object source, EventArgs e)
        {
            labelDate.Content = DateTime.Now.ToString("yyyy-MM-dd");
            labelTime.Content = DateTime.Now.ToString("hh:mm:ss");
        }
    }
}
